﻿using System;
using System.Data;
using System.Windows.Forms;
using System.Data.SqlClient;
using QuanLyTuyenSinh.Base;

namespace QuanLyTuyenSinh.Reports.ReportDiem
{
    public partial class frmPhachDiemM2 : Form
    {
       public frmPhachDiemM2()
        {
            InitializeComponent();
        }

        private void frmPhachDiemM2_Load(object sender, EventArgs e)
        {
            cbKhoiPhong.DataSource = monthibus.GetKhoithiUngVoiNganhHoc();
            cbKhoiPhong.ValueMember = "Khoithi";
            cbKhoiPhong.DisplayMember = "Khoithi";
        }

       
        private void cmdDS_Click(object sender, EventArgs e)
        {
            SqlCommand cmd = new SqlCommand("select PhachM2,DiemM2,Khoithi from TSSBD where Khoithi='" + cbKhoiPhong.Text.Trim() + "'", ConnectData.Getcon());
            SqlDataAdapter DTA = new SqlDataAdapter(cmd);
            DataTable DTL = new DataTable();
            DataSet DTS = new DataSet();
            DTA.Fill(DTS, "TSSBD");
            DTL = DTS.Tables["TSSBD"];
            rptPhachDiemM2 cry = new rptPhachDiemM2();
            cry.SetDataSource(DTL);
            cryStalDiemM2.ReportSource = cry;
            cryStalDiemM2.Refresh();
        }
    }
}
